﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SystemCenterSoa.DtoModel.SystemManager;
using SystemCenterSoa.PoModel.SystemManager;

namespace SystemCenterSoa.DtoModel
{
    public class MyAutoProfile : Profile
    {
        public MyAutoProfile()
        {
            //.ReverseMap()转换
            //把ModuleDb的modifi_name赋值给ModuleDbView的label
            CreateMap<ModulePo, ModuleDto>()
               //把ModuleDb的module_name 赋值给ModuleDbView 的label
               .ForMember(dest => dest.label, opt => opt.MapFrom(src => src.module_name))
               .ReverseMap();
        }
    }
}
